﻿#include "RenderTextureCube.h"
#include "WriteInTextureCube.h"

CRenderTextureCube::CRenderTextureCube()
{
    WriteInTexture=new CWriteInTextureCube();
}

void CRenderTextureCube::SyncToRenderThread(
    const uint32_t InWidth,
    const uint32_t InHeight,
    const uint32_t InPitch,
    ETextureFormat InFormat,
    const TVector<uint8_t> &InFront,
    const TVector<uint8_t> &InBack,
    const TVector<uint8_t> &InLeft,
    const TVector<uint8_t> &InRight,
    const TVector<uint8_t> &InTop,
    const TVector<uint8_t> &InBottom)
{
    std::lock_guard<std::mutex> LockGuard(WriteInTexture->Mutex);
    WriteInTexture->Width=InWidth;
    WriteInTexture->Height=InHeight;
    WriteInTexture->Pitch=InPitch;
    WriteInTexture->Format=InFormat;
    WriteInTexture->Front=InFront;
    WriteInTexture->Back=InBack;
    WriteInTexture->Left=InLeft;
    WriteInTexture->Right=InRight;
    WriteInTexture->Top=InTop;
    WriteInTexture->Bottom=InBottom;
    WriteInTexture->bDirty=true;

}
